UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '+tbRdQnztzoRafdaMn+0wgciaG/8YumwCpMdOflkBxY='
WHERE
key_id = '1e6060b83f5965f8624ad72f4bba096ec3ab1d5bddfad35cd2782cabe94ec36f'
AND (
token = '+tbRdQnztzoRafdaMn+0wgciaG/8YumwCpMdOflkBxY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)