UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'FZvPXEB55/baSM8Id/P4xf3m3Rp3IxzpuC2RW2UStUQ='
WHERE
key_id = '071eda2ae7bff51fe266f2789d5ab7c5947e5f377efd6e80aab00a4f03bf8382'
AND (
token = 'FZvPXEB55/baSM8Id/P4xf3m3Rp3IxzpuC2RW2UStUQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)