UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'RkoKeze8/0dYEesdQ0VadkMb2wJ1RK2H/lT3qKgC0Bo='
WHERE
key_id = '7bdb2604101cc9d921ec366cfab279a64a15bb41d2cc5d51eae98d7d22452543'
AND (
token = 'RkoKeze8/0dYEesdQ0VadkMb2wJ1RK2H/lT3qKgC0Bo='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)