UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'lXoa/jSdx38N/7e/1urZMzul1DGxl6wr7+ySR7cWLC4='
WHERE
key_id = '993954d24ebb25425d1aa3b0e0f6f0b90169ba5bb30eda2943ae738d6e3aaaf8'
AND (
token = 'lXoa/jSdx38N/7e/1urZMzul1DGxl6wr7+ySR7cWLC4='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)