UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'KGTx9cvF6P45ZDKlIEuiwtQKPlE9m8eAAmualNBteWM='
WHERE
key_id = '61019410eeff7bab29cf72d60e94b6ec3c8c263ad1dc5c2d9b9092ae00a10a15'
AND (
token = 'KGTx9cvF6P45ZDKlIEuiwtQKPlE9m8eAAmualNBteWM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)