UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'MGSLHA49oM6d+WSpEv7t3AqjlpFWbg63SuNXbqEucgY='
WHERE
key_id = 'ef69dfe4c4849c02a8262dc19f9fa0f2fb4161162d3fd551fdbbd75d51abf487'
AND (
token = 'MGSLHA49oM6d+WSpEv7t3AqjlpFWbg63SuNXbqEucgY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)