UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '+tauDSIFEgqexL75rtqhLOn6RaporjGGEBKZ1iiPGM8='
WHERE
key_id = 'bc993e464c5d43895738b17f598d0b3183b9c82eeab263ce30b16bddbe5d3eda'
AND (
token = '+tauDSIFEgqexL75rtqhLOn6RaporjGGEBKZ1iiPGM8='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)