UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '4kKWvFCUaW6my+7R5sq9gQUWse4D87gaDP9yaI3nby0='
WHERE
key_id = 'cd70dcb7c27ec680561ed2968e95947bbb1d80d4e5c2a809d1d03594c3878141'
AND (
token = '4kKWvFCUaW6my+7R5sq9gQUWse4D87gaDP9yaI3nby0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)