UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 's7bapaKxM9UcWFZw9FI88M08h106j8c9Itj6p79DlSQ='
WHERE
key_id = '2dd59ca34716a9adf20c71bf1762ee92ddd00fbb045725844fb5c6c202785e77'
AND (
token = 's7bapaKxM9UcWFZw9FI88M08h106j8c9Itj6p79DlSQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)