UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'GA4ISBJNMESFrj3rTOWqOxR6YJJFjMdRPSgK6lxMhQM='
WHERE
key_id = '2fde1d47cd333d8320f8c0c4591a21ab0ba382996d7a656dd8ede9d5d7ea1285'
AND (
token = 'GA4ISBJNMESFrj3rTOWqOxR6YJJFjMdRPSgK6lxMhQM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)