UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'fJPiasooOPnqdNueRpahcqAomfIFVn4XzFTbLG+LzhI='
WHERE
key_id = '377a24f8a7e23dbdaddccf418d10f81433c4a0a302a1634ee62bd9b3c620b071'
AND (
token = 'fJPiasooOPnqdNueRpahcqAomfIFVn4XzFTbLG+LzhI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)