UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '/jKeA0rdMun03FFFmYTaHG1+tbNHtqHQG2PEPvJpGT8='
WHERE
key_id = '5c2905b71c8f5bfcdbf4766656088058c7cd3dc7a49d7462f66a484f2260eef5'
AND (
token = '/jKeA0rdMun03FFFmYTaHG1+tbNHtqHQG2PEPvJpGT8='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)