UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'wwkKpHj5PqjKDaoLbd7d17TsVIXGmWQjlEk3/UJpJ/0='
WHERE
key_id = '28bbcccfbcfa340d1e457144a9ff3899e48ee413ff1fe610ce9b8e128226428f'
AND (
token = 'wwkKpHj5PqjKDaoLbd7d17TsVIXGmWQjlEk3/UJpJ/0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)