UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'rNQ4mgi4Iwdads/u6bySyf9D2g2V5POQSwuTDdLDccQ='
WHERE
key_id = '0280a67447e527a45432f845fbebaa64cdf7db3095b44fb80e344257785c577c'
AND (
token = 'rNQ4mgi4Iwdads/u6bySyf9D2g2V5POQSwuTDdLDccQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)