UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '/6/3XwMF1MuC002zip741PNgejzQVAO0SN1tGVAiA6A='
WHERE
key_id = '26a18a8395f4656c35a28a523822707cb144a9520bc9fcf9d43ea0fe495bd242'
AND (
token = '/6/3XwMF1MuC002zip741PNgejzQVAO0SN1tGVAiA6A='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)