UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '2kSEqJOQn5+8HgpjuXpm78cjnUjLpOHNi/qikw3EgUU='
WHERE
key_id = '887cef5f576df5d79a16eb4de4381fde6dcc715c041e9be0facedb8dd2ea63a6'
AND (
token = '2kSEqJOQn5+8HgpjuXpm78cjnUjLpOHNi/qikw3EgUU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)