UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '/VDFHLH37sKNfxWATeV/6zh1s7mHHuVC5tZb/Q3fSMs='
WHERE
key_id = '85a9ae767a4255df62bb40eae63a790ecc93af2ee1ce1ed4b099e8d7c2562895'
AND (
token = '/VDFHLH37sKNfxWATeV/6zh1s7mHHuVC5tZb/Q3fSMs='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)