UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '9YtcVLAe0GrSxgZjMUExYvrRwNyoqrIfM/TnflD22r4='
WHERE
key_id = '71cda2f0baebff0c98ae33ad78b6545ce2325eff9c4c2fed67ea5030c2809dcd'
AND (
token = '9YtcVLAe0GrSxgZjMUExYvrRwNyoqrIfM/TnflD22r4='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)