UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '69EZ2z02ciey6eWxHwVHpJVOoagxhvTeke12fq6ZDBg='
WHERE
key_id = '083603f5bb8a1ae03b38b4bcf7e1634b305aac7143321fc8e36c753be8aa31da'
AND (
token = '69EZ2z02ciey6eWxHwVHpJVOoagxhvTeke12fq6ZDBg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)