UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'MLUi9aP/OtpmKXHhsrSfVPFnduS/DOHjPn3/8w/cuWs=' 
WHERE 
  key_id = '17dd80de3fdc265030a672ff8ef46e4a82baf2dd03d5e52776be55e4c4113c38' 
  AND (
    token = 'MLUi9aP/OtpmKXHhsrSfVPFnduS/DOHjPn3/8w/cuWs=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00033