UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '6Vzw9lDB0uBX1EJMCWZ65e+oxNEic6WZBu1gGuTtwGg='
WHERE
key_id = '85368565ae93bb2011a503e4b8d798761f2c432751251e5bddd086e1f02a7c69'
AND (
token = '6Vzw9lDB0uBX1EJMCWZ65e+oxNEic6WZBu1gGuTtwGg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)