UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'GUU3NknNRXvYVhfv2qE/WRnfOTWJfkLvo4uSPNSOC9U='
WHERE
key_id = '24892a4c85369a75a39c05b746277f9c9ac3f2cf5783407992e98abe081f7e2f'
AND (
token = 'GUU3NknNRXvYVhfv2qE/WRnfOTWJfkLvo4uSPNSOC9U='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)