UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'YEpc4Iw/LhbrYj9kO4BOaGuJHtcFUzJzCLrZ09bsmlg='
WHERE
key_id = '26b1402cb466772805762ba513cc8e12bf60c4e52af9524d9809adf274cfb5b8'
AND (
token = 'YEpc4Iw/LhbrYj9kO4BOaGuJHtcFUzJzCLrZ09bsmlg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)