UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'FLOtOmuuVm+gabRy+oKqpqp8m7zTu6Ax7Ny8yK3MBBk='
WHERE
key_id = '888e625c79e78f99af898e21a6e5c8cb56bc7e5e729415fa37e531c1c9f5d242'
AND (
token = 'FLOtOmuuVm+gabRy+oKqpqp8m7zTu6Ax7Ny8yK3MBBk='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)