UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'WczXMhWQ9QYYKz7ovgbbxrSs4UeN/Q7sVP1uPQzXh9Y=' 
WHERE 
  key_id = '2c8481ccf8e8bc00a8251e46cec2581565daad3ece5cc04eda263b4af832ba80' 
  AND (
    token = 'WczXMhWQ9QYYKz7ovgbbxrSs4UeN/Q7sVP1uPQzXh9Y=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00031