UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'ANx3uiqSXi9/LQrPu8OBi/Lu7Y0aLTr/GFSL5kWyT8Y='
WHERE
key_id = 'ef90e8b46d858011cbc08260a98641a71cdf29fbd2100eac33f1b920d954d4cb'
AND (
token = 'ANx3uiqSXi9/LQrPu8OBi/Lu7Y0aLTr/GFSL5kWyT8Y='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)