UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'gou8DEH+xsm9k1HvORuqnxlLnM4GOkUuu9aJeVeCNhQ='
WHERE
key_id = 'ee5fd1c1d42dd42ed1d2b756500fed2df53a9d11f09e9b15f1aa8be3696c6ae0'
AND (
token = 'gou8DEH+xsm9k1HvORuqnxlLnM4GOkUuu9aJeVeCNhQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)