UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'FZunNVSvYrwKLkuuL23LoEN8ZRN/w2WY26NC/niQAyM='
WHERE
key_id = '09ea6e40ed5e76d79ae56a4c2585b9c58cfa6b383b98b0f4504f9dd13f9da4c1'
AND (
token = 'FZunNVSvYrwKLkuuL23LoEN8ZRN/w2WY26NC/niQAyM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)