UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'LirPSa4kKDDUDWHIhkqzQFoKMRQ1T155GqeFU3Ub54o='
WHERE
key_id = '282b06851548770d8b7fec6cdbda949467fcc81932ee44e71426f922220c5f03'
AND (
token = 'LirPSa4kKDDUDWHIhkqzQFoKMRQ1T155GqeFU3Ub54o='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)