UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'jYbhIDmVIGOg5gQJkdyyq36NXrBjQq0JQWkVEJJQxiY='
WHERE
key_id = 'dcac071798a81f55144ce7b5c02e57a40a8a2a89885788205f154c06d0843660'
AND (
token = 'jYbhIDmVIGOg5gQJkdyyq36NXrBjQq0JQWkVEJJQxiY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)