UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'PChi/6KnvzdGWmmMWyBQAvMClRpRCWwhF8aeCWUeCF8='
WHERE
key_id = '9380c9e92ddd2d2acf48ede1562c0f0433d966249a6b82b031dea36ebdb55e5b'
AND (
token = 'PChi/6KnvzdGWmmMWyBQAvMClRpRCWwhF8aeCWUeCF8='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)