UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '/amXU9F9/yfCrosBK2uEIqe/u//6dDpsaQP6UJ3IRNE='
WHERE
key_id = '8544995b5365308e8dd3b045f9632d44a769adbd37bdeb7fe385e434049c381c'
AND (
token = '/amXU9F9/yfCrosBK2uEIqe/u//6dDpsaQP6UJ3IRNE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)