UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'eEcnYOoiVVQaOLkyxTC5Zzf0l1+vV7Wp1YJKGlWTB4I='
WHERE
key_id = '7147c6ea10d76c4764bf4f1d2eadd29ea3a0cff3cb8e6005cf55a56ea24a2b83'
AND (
token = 'eEcnYOoiVVQaOLkyxTC5Zzf0l1+vV7Wp1YJKGlWTB4I='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)